
export const setting = [
{
  field: "effectiveFlag",
  title: "通告有效期",
  type: 'radio',
  optional: [
    {
      name: '永久',
      value: '1'
    },
    {
      name: '选择有效期',
      value: '3'
    }
  ]
},
{
  field: "effectiveStartDate",
  title: "开始日期",
  type: "date",
  showEditSituation: (form) => {
    if (form.effectiveFlag == 3) {
      return true
    }

    return false
  }
},
{
  field: "effectiveEndDate",
  title: "结束日期",
  type: "date",
  showEditSituation: (form) => {
    if (form.effectiveFlag == 3) {
      return true
    }

    return false
  }
},
{
  field: "msgLevel",
  title: "通告等级",
  info: '通告等级为高，则表示发布的消息将会置顶。紧急重要通告发布推荐选择高等级；普通通告发布推荐选择低等级。',
  type: 'radio',
  optional: [
    {
      name: '高',
      value: '1'
    },
    {
      name: '中',
      value: '2'
    },
    {
      name: '低',
      value: '3'
    }
  ]
}
]

export const rule = {
  msgId: [
    { required: true, message: '必填项', trigger: 'blur' }
  ],
  msgTitle: [
    { required: true, message: '必填项', trigger: 'blur' }
  ],
  msgContent: [
    { required: true, message: '必填项', trigger: 'blur' }
  ],
  sendOper: [
    { required: true, message: '必填项', trigger: 'blur' }
  ],
  sendDate: [
    { required: true, message: '必填项', trigger: 'blur' }
  ],
  sendTime: [
    { required: true, message: '必填项', trigger: 'blur' }
  ],}
